package org.example.shili.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/shili")
public class ShiLiController {
    @Autowired
    private RedisTemplate redisTemplate;
    @RequestMapping("/test")
    public String test(){
        redisTemplate.opsForValue().set("shili","shili");
        System.out.println(redisTemplate.opsForValue().get("shili"));
        return "shili";
    }
}
